'''
Created on Dec 13, 2009

@author: sj
'''
from BeautifulSoup import BeautifulStoneSoup

class SongMetaData(object):
    '''
    classdocs
    '''
    song_name = ''
    artist = ''
    url = None

    def __init__(self, meta_data_xml):
        '''
        Constructor
        '''
        soup = BeautifulStoneSoup(meta_data_xml)
        
        self.song_name = soup.songs.song['title']
        self.artist = soup.songs.song['artist']
        self.url = soup.songs.song['path']
    
    def get_name(self):
        return self.song_name
    
    def get_artist(self):
        return self.artist
    
    def get_mp3_url(self):
        return self.url
    
    def __unicode__(self):
        return 'Song: ' + self.song_name + 'Artist: ' + self.artist + '\n'
        